package my.tutorial.javacore.test;

public class Guess {

	public static void main(String[] args) {
		int number = (int) Math.random() * 5 + 1;
		while (true) {
			int input = new java.util.Scanner(System.in).nextInt();

			if (input == number) {
				System.out.println("you are right");
				break;
			} else if (input > number) {
				System.out.println("the given number is too big");
				continue;
			} else {
				System.out.println("the given number is too small");
				continue;
			}
		}

	}

}
